<!--
 Copyright 2011 The Apache Software Foundation
 
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
     http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->

<%@include file="/commons/decelerations.jsp" %>
<c:set var="submitButtonName"><c:choose>
	<c:when test='${action eq "CreatePerson"}'>Create Person</c:when>
	<c:otherwise>Maintain Person</c:otherwise>
</c:choose></c:set>

<form action="${action}" method="post" id="form">
   <table>
   	   <c:if test="${!(action eq 'CreatePerson')}">
   	   	<tr><td>Id</td><td><input type="text" id = "id" name="id" value="${person.id}" readonly="readonly"/></td></tr>
   	   </c:if>
       <tr><td>FirstName</td><td><input type="text" id = "firstName" name="firstName" value="${person.firstName}"/></td></tr>
       <tr><td>LastName</td><td><input type="text" id = "lastName" name="lastName" value="${person.lastName}"/></td></tr>
       <tr><td>AccountName</td><td><input type="text" id = "accountName" name="accountName" value="${person.accountName}"/></td></tr>
       <tr><td>Password</td><td><input type="password" name="password" value="${person.password}"/></td></tr>
       <tr><td>Role</td>
       <td>
	       <label for="admin">Administrator</label><input type="checkbox" id="admin" name="roleName" value="ADMIN"/>
	       <label for="member">Member</label><input type="checkbox" id="member" name="roleName" value="MEMBER"/>
       </td></tr>
       <tr>
       	<td><input type="submit" value="${submitButtonName}"/></td>
       	<td><button type="reset">Reset</button></td>
       </tr>
   </table>
</form>
